home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form RBLogOptions
- BackColor = &H00C0C0C0&
- Caption = "RDBLIB Log Option Settings"
- ClientHeight = 2475
- ClientLeft = 870
- ClientTop = 1485
- ClientWidth = 8130
- Height = 2880
- Left = 810
- LinkTopic = "Form1"
- ScaleHeight = 2475
- ScaleWidth = 8130
- Top = 1140
- Width = 8250
- Begin VideoSoftElastic VSElastic1
- Align = 5 'Fill Container
- BevelChildren = 3 'No Graphical or Elastics
- CaptionPos = 7 'Right Center
- ConvInfo = RBLOGOPT.FRX:0000
- ForeColor = &H00FF0000&
- Height = 2475
- IntBkg = &H00C0C0C0&
- Left = 0
- TabIndex = 6
- TagSplit = -1 'True
- TagWidth = 2500
- Top = 0
- Width = 8130
- Begin TextBox TxtUser
- Height = 375
- Left = 2460
- TabIndex = 3
- Tag = "User Name|Enter your name"
- Text = "Text1"
- Top = 1260
- Width = 4875
- Begin CommonDialog CMDialog1
- Left = 780
- Top = 240
- Begin SSCommand BtnCancel
- Caption = "Cancel"
- Font3D = 0 'None
- Height = 375
- Left = 4380
- TabIndex = 5
- Tag = "|Click to exit without savings the new settings"
- Top = 1740
- Width = 1695
- Begin VideoSoftElastic FileFindBtn
- BevelInner = 0 'None
- BorderWidth = 2
- ConvInfo = RBLOGOPT.FRX:000B
- CornerColor = &H00C0C0C0&
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 555
- IntBkg = &H00C0C0C0&
- Left = 7380
- Picture = RBLOGOPT.FRX:0016
- Style = 3 'Command Button
- TabIndex = 2
- Tag = "|Click to browse for the directory containing the log file"
- Top = 600
- Width = 555
- Begin SSCommand BtnSave
- Caption = "Save"
- Font3D = 0 'None
- Height = 375
- Left = 2580
- TabIndex = 4
- Tag = "|Click to save the new settings"
- Top = 1740
- Width = 1695
- Begin VideoSoftElastic cMsg
- Align = 2 'Bottom
- BevelInner = 0 'None
- BevelOuter = 1 'Raised
- BevelOuterDir = 1 'Horizontal
- BevelOuterWidth = 1
- BorderWidth = 2
- ChildSpacing = 1
- ConvInfo = RBLOGOPT.FRX:0318
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H00FF0000&
- Height = 255
- IntBkg = &H00C0C0C0&
- Left = 0
- TabIndex = 7
- Top = 2220
- Width = 8130
- Begin TextBox TxtLogFileLoc
- Height = 375
- Left = 2460
- TabIndex = 1
- Tag = "Location of Log Database|Enter the path where the logging database RDBLOG.MDB exists"
- Text = "Text1"
- Top = 780
- Width = 4875
- Begin SSCheck ChkLogPerfData
- Caption = "Log Performance Data"
- Font3D = 0 'None
- ForeColor = &H00FF0000&
- Height = 375
- Left = 2460
- TabIndex = 0
- Tag = "|Check if you want to log performance data (times)"
- Top = 300
- Width = 4875
- Option Explicit
- Dim IniFileName$, AppName$, KeyName$, DefaultStr$
- Dim nSize%, Numeric%, nDefault, ReturnStr$, NewVal$
- Sub BtnCancel_Click ()
- Unload RBLogOptions
- End Sub
- Sub BtnCancel_GotFocus ()
- cMsg.Caption = RB_StatusMsg((BtnCancel.Tag))
- End Sub
- Sub BtnCancel_LostFocus ()
- cMsg.Caption = ""
- End Sub
- Sub BtnSave_Click ()
- On Error GoTo saveerr
- RB_CloseLog
- If TxtUser.Text = "" Then
- Beep
- MsgBox "Please provide your name in the user name field.", MB_ICONINFORMATION, "Set Log Options"
- Exit Sub
- End If
- mousepointer = HOURGLASS
- IniFileName$ = "RDBLOG.INI" 'name of ini file
- AppName$ = "Logging Parameters" 'Name of application or section heading
- KeyName$ = "Database Location" 'Keyword or variable name
- NewVal$ = TxtLogFileLoc.Text
- SaveIni AppName$, IniFileName$, KeyName$, NewVal$
- KeyName$ = "Log Performance Data" 'Keyword or variable name
- If ChkLogPerfData.Value = True Then
- NewVal$ = "True"
- Else
- NewVal$ = "False"
- End If
- SaveIni AppName$, IniFileName$, KeyName$, NewVal$
- KeyName$ = "User Name" 'Keyword or variable name
- NewVal$ = TxtUser.Text
- SaveIni AppName$, IniFileName$, KeyName$, NewVal$
- RB_OpenLog
- mousepointer = DEFAULT
- Unload RBLogOptions
- Exit Sub
- saveerr:
- End Sub
- Sub BtnSave_GotFocus ()
- cMsg.Caption = RB_StatusMsg((BtnSave.Tag))
- End Sub
- Sub BtnSave_LostFocus ()
- cMsg.Caption = ""
- End Sub
- Sub ChkLogPerfData_GotFocus ()
- cMsg.Caption = RB_StatusMsg((ChkLogPerfData.Tag))
- End Sub
- Sub ChkLogPerfData_LostFocus ()
- cMsg.Caption = ""
- End Sub
- Sub FileFindBtn_Click ()
- Dim erraction As Integer
- On Error GoTo FindFileErr
- CMDialog1.DefaultExt = "*.mdb"
- CMDialog1.DialogTitle = "Select Location of RDB Log Database"
- CMDialog1.Filter = "RDB Log Database|rdblog.mdb|"
- CMDialog1.FilterIndex = 1
- CMDialog1.Flags = OFN_FILEMUSTEXIST Or OFN_PATHMUSTEXIST
- CMDialog1.Action = 1
- TxtLogFileLoc.Text = Left$(CMDialog1.Filename, Len(CMDialog1.Filename) - Len(CMDialog1.Filetitle))
- cMsg.Caption = ""
- Exit Sub
- FindFileErr:
- erraction = RB_ErrorHandler("RBLogOptions", "FileFindBtn_Click")
- Select Case erraction
- Case 1
- Resume 0
- Case 2
- Resume Next
- End Select
- End Sub
- Sub FileFindBtn_GotFocus ()
- cMsg.Caption = RB_StatusMsg((FileFindBtn.Tag))
- End Sub
- Sub FileFindBtn_LostFocus ()
- cMsg.Caption = ""
- End Sub
- Sub FldGotFocus (pControl As Control)
- pControl.BackColor = BLUE
- pControl.ForeColor = WHITE
- cMsg.Caption = RB_StatusMsg((pControl.Tag))
- pControl.SelStart = 0
- pControl.SelLength = 1000
- End Sub
- Sub FldLostFocus (pControl As Control)
- pControl.BackColor = WHITE
- pControl.ForeColor = BLACK
- cMsg.Caption = ""
- End Sub
- Sub Form_Load ()
- Dim erraction As Integer
- On Error GoTo FormLoadErr
- IniFileName$ = "RDBLOG.INI" 'name of ini file
- AppName$ = "Logging Parameters" 'Name of application or section heading
- KeyName$ = "Database Location" 'Keyword or variable name
- DefaultStr$ = "" 'Default string (for String variables)
- nSize% = 255 'uncertain - possibly length of fill string
- Numeric% = False 'Tell it we are looking for a string
- ReadIni AppName$, KeyName$, nDefault, DefaultStr$, ReturnStr$, Numeric%, IniFileName$
- TxtLogFileLoc.Text = ReturnStr$
- KeyName$ = "Log Performance Data" 'Keyword or variable name
- DefaultStr$ = "" 'Default string (for String variables)
- ReadIni AppName$, KeyName$, nDefault, DefaultStr$, ReturnStr$, Numeric%, IniFileName$
- If ReturnStr$ = "True" Then
- ChkLogPerfData.Value = True
- Else
- ChkLogPerfData.Value = False
- End If
- KeyName$ = "User Name" 'Keyword or variable name
- DefaultStr$ = "" 'Default string (for String variables)
- nSize% = 255 'uncertain - possibly length of fill string
- Numeric% = False 'Tell it we are looking for a string
- ReadIni AppName$, KeyName$, nDefault, DefaultStr$, ReturnStr$, Numeric%, IniFileName$
- TxtUser.Text = ReturnStr$
- Exit Sub
- FormLoadErr:
- erraction = RB_ErrorHandler("RBLogOptions", "Form_Load")
- Select Case erraction
- Case 1
- Resume 0
- Case 2
- Resume Next
- End Select
- End Sub
- Sub TxtLogFileLoc_GotFocus ()
- FldGotFocus TxtLogFileLoc
- End Sub
- Sub TxtLogFileLoc_LostFocus ()
- FldLostFocus TxtLogFileLoc
- TxtLogFileLoc.Text = UCase$(Trim$(TxtLogFileLoc.Text))
- If RTrim$(TxtLogFileLoc.Text) <> "" Then
- If Right$(TxtLogFileLoc.Text, 1) <> "\" Then
- TxtLogFileLoc.Text = TxtLogFileLoc.Text + "\"
- End If
- End If
- End Sub
- Sub TxtUser_GotFocus ()
- FldGotFocus TxtUser
- End Sub
- Sub TxtUser_LostFocus ()
- FldLostFocus TxtUser
- End Sub
-